package com.example.d10_homework.homework06;

public class Test {
    public static void main(String[] args) {
        // 需求:有100份礼品,小红,小明两人同时发送,当剩下的礼品小于10份的时候则不再送出,利用多线程模拟该过程并将线程的名称打印出来
        // 并最后在控制台分别打印小红,小明各自送出多少分礼物
        Gift gift = new Gift(100);

        GiftThread giftThread = new GiftThread(gift);

        Thread t1 = new Thread(giftThread, "小红");
        Thread t2 = new Thread(giftThread, "小明");

        t1.start();
        t2.start();
    }
}
